using UnityEditor;
using UnityEditor.UI;
using UnityEngine.UI;

namespace Runtime.Module.GameGraphic.Editor
{
    [CustomEditor(typeof(Dropdown), true)]
    public class CustomDropdownEditor : DropdownEditor
    {
        IsScriptCtrlEditorData<Dropdown> isScriptCtrlEditorData;

        protected override void OnEnable()
        {
            base.OnEnable();
            isScriptCtrlEditorData = new IsScriptCtrlEditorData<Dropdown>(serializedObject, (Dropdown)target);
        }

        protected override void OnDisable()
        {
            base.OnDisable();
            isScriptCtrlEditorData = null;
        }

        public override void SaveChanges()
        {
            base.SaveChanges();
        }

        public override void OnInspectorGUI()
        {
            isScriptCtrlEditorData.OnInspectorGUIOfScript();
            base.OnInspectorGUI();
        }
    }
}